<template>
  <div class="sgjg">

    <el-form :model="form" label-width="80px" ref="form">
      <el-form-item>
        <label class="label">今日施工监管</label>
        <span class="date-span"><el-date-picker class="date" placeholder="选择日期" type="date" v-model="form.date"></el-date-picker></span>
      </el-form-item>
      <el-form-item label="区间">
        <el-input v-model="form.qujian"></el-input>
      </el-form-item>
      <el-form-item label="监管类型">
        <el-select :value="form.type">
          <el-option v-for="item in items" :key="item" :label="item" :value="item">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="时间">
        <el-col :span="11">
          <el-time-picker format="hh:mm A" placeholder="选择时间" style="width: 100%;" v-model="form.time1"></el-time-picker>
        </el-col>
        <el-col :span="2" class="line">-</el-col>
        <el-col :span="11">
          <el-time-picker format="hh:mm A" placeholder="选择时间" style="width: 100%;" v-model="form.time2"></el-time-picker>
        </el-col>
      </el-form-item>
      <el-form-item label="监管人员">
        <el-input v-model="form.type"></el-input>
      </el-form-item>
      <el-form-item  label="监管内容">
        <el-input :rows="11" height="200px" resize="false" type="textarea" v-model="form.context"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button @click="onSubmit" type="primary">立即创建</el-button>
        <el-button @click="resetForm">重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
    export default {
      name: "SGJG",
      data(){
          return{
            form:{
              time1:'',
              time2:'',
              date:'',
              type:'',
              qujian:'',
              context:'',
              people:'',
            },
            items: ['施工Ⅰ级','施工Ⅱ级','施工Ⅲ级','邻近A','邻近B','邻近C'],
          }
      },
      created() {
        const date = new Date();
        this.form.date = date;
      },
      methods:{
        onSubmit(){

        },
        resetForm(){
          this.form.context=''
          this.form.time1=''
          this.form.people=''
          this.form.type=''
          this.form.time2=''
          this.form.qujian=''
          this.form.date=new Date()
        }
      }
    }
</script>

<style lang="less" scoped>
  .label{
    font-size: 22px;
    color: #55a532;
    padding: 10px;
  }
  .sgjg{
    padding: 20px 80px;
  }
  .date-span{
    padding: 20px;
    .date{
      width: 140px; float:right;
    }
  }

</style>
